{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "ename": "ImportError",
     "evalue": "No module named 'Curves'",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mImportError\u001b[0m                               Traceback (most recent call last)",
      "\u001b[0;32m<ipython-input-2-7e7425fa6d1d>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mCurves\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mPortfolioLoss\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mPortfolioLossCalculations\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[0;31mImportError\u001b[0m: No module named 'Curves'"
     ],
     "output_type": "error"
    }
   ],
   "source": [
    ""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "t_step = 1.0 / 365.0\n",
    "simNumber = 10\n",
    "start_date = date(2012,2,28)\n",
    "end_date = date(2015,12,31)  # Last Date of the Portfolio\n",
    "referenceDate = date(2012, 12, 20)\n",
    "\n",
    "#tvalues = [today + timedelta(days = 30) * n for n in range(37)] #3 years\n",
    "#print(tvalues)\n",
    "\n",
    "K1 = 0.01\n",
    "K2 = 0.03\n",
    "Fs = [0.3, 0.8]\n",
    "Rs = [0.40, 0.60]\n",
    "betas = [0.30, 1]\n",
    "freq = \"3M\"\n",
    "test = PortfolioLossCalculations.PortfolioLossCalculation(K1 = K1, K2 = K2, Fs = Fs, Rs =Rs, betas = betas,\n",
    "                                start_date = start_date,end_date = end_date,freq=freq,\n",
    "                                coupon = 0.001,referenceDate = referenceDate,rating=\"AAA\",\n",
    "                                R=0)\n",
    "test.getQ()\n",
    "test.Q_lhp(K1=K1, K2 = K2, R =0.4,beta = 0.30)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2.0
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}